package com.starblink.android.basic.sensorsdata.room.entity

import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.benasher44.uuid.uuid4
import com.starblink.android.basic.sensorsdata.room.TraceConverter
import com.starblink.android.basic.sensorsdata.room.config.DatabaseConfig

@Entity(tableName = DatabaseConfig.spmTableName)
@TypeConverters(TraceConverter::class)
class SKTraceEntity() {

    @PrimaryKey(autoGenerate = true)
    var id: Int = 0
    var trackEvent: String? = null
    var trackUniqueId: String? = null
    var env: Int? = null// 0线上 1预发  2测试  3开发
    var clientVersion: String? = null // App版本
    var clientBuild: String? = null // App build号
    var bundleId: String? = null // 包名
    var os: String = "and"// 操作系统类型
    var osVersion: String? = null // 操作系统版本
    var networkType: String? = null // 网络类型
    var model: String? = null // 手机型号
    var brand: String? = null // 手机品牌
    var country: String? = null // 国家
    var language: String? = null // 语言
    var tz: String? = null // 时区
    var ts: Long = 0 //时间
    var deviceId: String? = null // 设备Id
    var timeSinceLaunch: String? = null // App已经运行时长
    var androidId: String? = null // 安卓Id
    var launchType: String? = null // 启动方式
    var sessionId: String? = null // App运行sessionId
    var siteType: Int? = null //1 欧洲 2美国

    //  具体埋点数据
    var userId: String? = null // 用户Id
    var event: String? = null // 事件类型
    var eventParams: Map<String, String> = mapOf() //  事件相关额外参数
    var eventPath: List<String> = listOf() // 页面操作路径
    var route: String? = null // 页面路由
    var spmCnt: String? = null // a.b.c.d.e
    var spmPrev: String? = null // 事件来源spm
    var traceInfo: String? = null // 追踪数据
    var params: Map<String, String> = mapOf() //  埋点业务参数A
}
